import { Pipe, PipeTransform } from '@angular/core';

@Pipe({
  name: 'toK'
})
export class ToKPipe implements PipeTransform {

  transform(value: number, ...args: unknown[]): string {

    if(value>=1000){
      return Math.floor(value/1000)+'K';
    }
    else{
      return value+"";
    }
  }

}
